#include "ForgotPasswordUI.h"
#include "ui_forgotPassword.h"

#include <stdio.h>
#include <time.h>

char * ForgotPasswordUI::questionList[] = {
    "What is your favorite Michael Bolton song?",
    "What is the name of your first pet?",
    "What is your favorite type of stapler?",
};

ForgotPasswordUI::ForgotPasswordUI(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ForgotPasswordUI)
{
    ui->setupUi(this);

    // Choose random question
    srand(time(NULL));
    unsigned int question = rand() % 3;

    // Display question
    QString questionString(questionList[question]);
    ui->securityQuestionLabel->setText(questionString);
}

ForgotPasswordUI::~ForgotPasswordUI()
{
    delete ui;
}

void ForgotPasswordUI::on_submitButton_clicked()
{
    hide();
}
